Learning Objectives

After completing this lesson, you’ll be able to:

What are Dynamic Workflows?

Dynamic workflows are a way to create "schema-less” workspaces.

Most workspaces covered elsewhere in FME training involve defining a static schema in the workspace. In other words, the source and destination schema reflect the structure of the source data (what we have) and the structure of the destination data the user requires (what we want).

A workspace with a fixed schema

A “traditional” static workspace like this is bound to a static schema.

When you press the Run button:

The two schemas are the same by default, but they don’t have to be. The writer schema can be manually edited to create different outputs. However, in a static workspace, that destination schema is still defined in the workspace itself.

Note

Schema is another term for “data model.” It’s the structure of the data. In a static workflow, the reader schema defines the data you have, and the writer schema the data you want to get. For this section, it’s useful to think of a schema as comprised of a trio of objects: feature types, attributes, and geometry types.

In contrast, a dynamic workspace does not make assumptions about the source and/or destination schema. It’s an approach to workspace design that lets the workspace handle data regardless of the schema used.

A dynamic workspace

When you press the Run button:

In other words, the schemas do not need to be defined beforehand. They are fetched dynamically at run time. 

Dynamic Readers

On the reader side of things, a dynamic workspace is very similar to using Merge Parameters; feature types are given free entry to a workspace, regardless of whether they are defined there.

Data is also read regardless of attributes or geometry type.

Dynamic reading 

Note

You might think of dynamic reading as, “I’ll read whatever you give me,” in this specific format.

Dynamic Writers

The writer side of a dynamic workspace mimics the reader part; feature types are written to the destination dataset, regardless of whether they are defined in the workspace.

Additionally, all attributes and geometries get written, regardless of whether they have been predefined in a writer feature type.

Dynamic writing

Note

Similarly, you might think of dynamic writing as, “I’ll write whatever you give me” in the format of your choice.

Common Uses for Dynamic Workflows

Dynamic workflows can be useful for cases like:

Generic Versus Dynamic

It’s important to understand the differences between generic and dynamic workspaces and when to use each of these tools. 

Note

For more details on generic workspaces, refer to Read and Write Any Data Format with Generic Mode. For more details on fanouts, see Read and Write Your Data Mid-Workflow.

This table is useful as a reference guide:

  I know the format I don’t know the format  
I know the feature types Static Generic + Static I know the attributes
I don’t know the feature types Fanout Generic + Fanout I know the attributes
I know the feature types Dynamic Generic + Dynamic I don’t know the attributes
I don’t know the feature types Dynamic Generic + Dynamic I don’t know the attributes

For example, let’s assume you operate a data upload website. The data will be in a known structure (feature types) and with known attributes. However, you don’t know what format it will be. That needs a static schema (because that part is known) but with a generic reader.

If, on the other hand, the format is always the same, but the attributes are unknown, that will require a dynamic workspace.